package com.net.xpay.core.dao.safePay;

import com.net.xpay.core.domain.safePay.BookAccountChargeOrder;
import com.net.xpay.core.model.BookAccountChargeOrderSearchModel;
import com.net.common.dao.Page;
import com.net.common.dao.VersionedMapper;
import com.net.common.annotation.DataShard;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@DataShard("")
@Repository
public interface BookAccountChargeOrderMapper extends VersionedMapper<Long, BookAccountChargeOrder> {
    List<Long> listNeedUpdateOrder();

    List<BookAccountChargeOrder> search(@Param("searchModel") BookAccountChargeOrderSearchModel searchModel, @Param("page") Page page);

    long searchCount(@Param("searchModel") BookAccountChargeOrderSearchModel searchModel);

    BigDecimal sumSuccessTransAmount(@Param("userId") Long userId, @Param("minEndTime") LocalDateTime minEndTime, @Param("maxEndTime") LocalDateTime maxEndTime);

    List<BookAccountChargeOrder> list(@Param("searchModel")BookAccountChargeOrderSearchModel searchModel);
}
